package com.new_wear.project.system.vehicleinformation.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.new_wear.project.system.vehicleinformation.mapper.VehicleinformationMapper;
import com.new_wear.project.system.vehicleinformation.domain.Vehicleinformation;
import com.new_wear.project.system.vehicleinformation.service.IVehicleinformationService;
import com.new_wear.common.utils.text.Convert;

/**
 * 车辆信息Service业务层处理
 * 
 * @author new_wear
 * @date 2019-12-23
 */
@Service
public class VehicleinformationServiceImpl implements IVehicleinformationService 
{
    @Autowired
    private VehicleinformationMapper vehicleinformationMapper;

    /**
     * 查询车辆信息
     * 
     * @param id 车辆信息ID
     * @return 车辆信息
     */
    @Override
    public Vehicleinformation selectVehicleinformationById(Long id)
    {
        return vehicleinformationMapper.selectVehicleinformationById(id);
    }

    /**
     * 查询车辆信息列表
     * 
     * @param vehicleinformation 车辆信息
     * @return 车辆信息
     */
    @Override
    public List<Vehicleinformation> selectVehicleinformationList(Vehicleinformation vehicleinformation)
    {
        return vehicleinformationMapper.selectVehicleinformationList(vehicleinformation);
    }

    /**
     * 新增车辆信息
     * 
     * @param vehicleinformation 车辆信息
     * @return 结果
     */
    @Override
    public int insertVehicleinformation(Vehicleinformation vehicleinformation)
    {
        return vehicleinformationMapper.insertVehicleinformation(vehicleinformation);
    }

    /**
     * 修改车辆信息
     * 
     * @param vehicleinformation 车辆信息
     * @return 结果
     */
    @Override
    public int updateVehicleinformation(Vehicleinformation vehicleinformation)
    {
        return vehicleinformationMapper.updateVehicleinformation(vehicleinformation);
    }

    /**
     * 删除车辆信息对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteVehicleinformationByIds(String ids)
    {
        return vehicleinformationMapper.deleteVehicleinformationByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除车辆信息信息
     * 
     * @param id 车辆信息ID
     * @return 结果
     */
    @Override
    public int deleteVehicleinformationById(Long id)
    {
        return vehicleinformationMapper.deleteVehicleinformationById(id);
    }
}
